package cn.ai.shoes.common.exception.constant;


import cn.ai.shoes.common.exception.util.ErrorCode;

import javax.management.loading.MLetContent;

public interface GlobalErrorCodeConstants {

    ErrorCode SUCCESS = new ErrorCode(0, "成功");

    // ========== 客户端错误段 ==========

    ErrorCode BAD_REQUEST = new ErrorCode(400, "请求参数不正确");
    ErrorCode UNAUTHORIZED = new ErrorCode(401, "账号未登录");
    ErrorCode FORBIDDEN = new ErrorCode(403, "没有该操作权限");
    ErrorCode NOT_FOUND = new ErrorCode(404, "请求未找到");
    ErrorCode METHOD_NOT_ALLOWED = new ErrorCode(405, "请求方法不正确");
    ErrorCode LOCKED = new ErrorCode(423, "请求失败，请稍后重试"); // 并发请求，不允许
    ErrorCode TOO_MANY_REQUESTS = new ErrorCode(429, "请求过于频繁，请稍后重试");

    // ========== 服务端错误段 ==========

    ErrorCode INTERNAL_SERVER_ERROR = new ErrorCode(500, "系统异常");
    ErrorCode NOT_IMPLEMENTED = new ErrorCode(501, "功能未实现/未开启");
    ErrorCode ERROR_CONFIGURATION = new ErrorCode(502, "错误的配置项");

    ErrorCode CONVERT_MAP_ERROR = new ErrorCode(503, "转换Map失败");
    ErrorCode CONVERT_ARRAY_ERROR = new ErrorCode(504, "转换Array失败");

    // ========== 自定义错误段 ==========
    ErrorCode USER_PASSWORD_ERROR = new ErrorCode(1000, "用户名或密码错误");
    //账号已在其他地方登录
    ErrorCode ACCOUNT_OTHER_LOGIN = new ErrorCode(1001, "账号已在其他地方登录");
    //用户名已存在
    ErrorCode USERNAME_EXISTS = new ErrorCode(1002, "用户名已存在");
    //token验证失败
    ErrorCode TOKEN_VERIFY_FAIL = new ErrorCode(1003, "token验证失败");
    //用户不存在
    ErrorCode USER_NOT_EXIST = new ErrorCode(1004, "用户不存在");
    //用户没有权限
    ErrorCode USER_NO_PERMISSION = new ErrorCode(1005, "用户没有权限");
    //邀请码不存在
    ErrorCode INVITATION_CODE_NOT_EXIST = new ErrorCode(1006, "邀请码不存在");
    //邀请码已被使用
    ErrorCode INVITATION_CODE_USED = new ErrorCode(1007, "邀请码已被使用");
    //邀请码已过期
    ErrorCode INVITATION_CODE_EXPIRED = new ErrorCode(1008, "邀请码已过期");
    //邀请码已被禁用
    ErrorCode INVITATION_CODE_DISABLED = new ErrorCode(1009, "邀请码已被禁用");
    //邀请码数量不能大于100
    ErrorCode INVITATION_CODE_NUMBER_LIMIT = new ErrorCode(1010, "邀请码数量不能大于100");
    //===================ComfyuiApi相关==============================
    ErrorCode COMFYUI_API_ERROR =new ErrorCode(1010, "ComfyuiApi调用失败") ;
    //返回值为空
    ErrorCode COMFYUI_API_RETURN_NULL = new ErrorCode(1010, "ComfyuiApi返回值为空");
    ErrorCode COMFYUI_FILE_NULL = new ErrorCode(1010, "资源文件不存在");
    ErrorCode COMFYUI_SERVER_NULL_EXIST = new ErrorCode(1010, "没有当前服务器");
    ErrorCode COMFYUI_TIMEOUT_ERROR = new ErrorCode(1011, "ComfyuiApi请求超时");
    ErrorCode COMFYUI_FAILED_SAVE_IMAGE = new ErrorCode(1012, "ComfyuiApi保存图片失败");
    ErrorCode COMFYUI_LOG_ERROR = new ErrorCode(1013, "ComfyuiApi等待任务失败");
    //===================蒙版==============================
    ErrorCode Mask_ERROR = new ErrorCode(1014, "请上传模板图片");
    ErrorCode FILE_UPLOAD_FAILED = new ErrorCode(1013, "文件上传失败");
    ErrorCode FILE_DOWNLOAD_FAILED = new ErrorCode(1014, "文件下载失败");
    ErrorCode FILE_DELETE_FAILED = new ErrorCode(1015, "文件删除失败");
    ErrorCode IMAGE_UPLOAD_ERROR = new ErrorCode(1016, "图片上传失败");
    ErrorCode SHOE_NOT_EXIST = new ErrorCode(1017, "模型不存在");
    ErrorCode COMFYUI_USER_NOT_LOGIN = new ErrorCode(1018, "Comfyui用户未登录");
    ErrorCode PARAMETER_NOT_NULL = new ErrorCode(1019, "参数不能为空");
    ErrorCode PHONE_FROM_ERROR =new ErrorCode(1021,"手机号格式错误");
    ErrorCode SMS_SEND_ERROR = new ErrorCode(1022, "短信发送失败");
    ErrorCode USER_REGISTER_ERROR = new ErrorCode(1023, "用户注册失败");
    ErrorCode SMS_CODE_ERROR = new ErrorCode(1025, "请输入正确的验证码");
    ErrorCode SMS_CODE_ISNULL = new ErrorCode(1025, "请输入验证码");
    ErrorCode SERVER_NOT_EXIST = new ErrorCode(1026, "服务器不存在");
    ErrorCode SERVER_NOT_AVAILABLE = new ErrorCode(1026, "没有可用的服务器");
    ErrorCode SMS_SEND_FREQUENTLY = new ErrorCode(1027, "短信发送过于频繁，请稍后重试");
    ErrorCode SMS_SEND_LIMIT = new ErrorCode(1027, "今日短信发送次数已达上限");
    ErrorCode IMAGE_NOT_FOUND = new ErrorCode(2001, "图像不存在");
    ErrorCode COMFYUI_SERVER_URL_ERROR = new ErrorCode(1028, "Comfyui服务器地址错误");
    ErrorCode USER_EXIST = new ErrorCode(1029, "用户已存在");
    ErrorCode PERMISSION_DENIED = new ErrorCode(1030, "权限不足");
    ErrorCode UID_NOT_EXIST = new ErrorCode(1030, "用户唯一标识不存在");
    //无法找到用户
    ErrorCode USER_NOT_FOUND = new ErrorCode(1031, "无法找到用户");
}
